<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8"/>
    <title>Vue示例</title>
</head>

<body>
<div id="app">
    <child-component>
        <p>分发的内容</p>
        <p>更多分发的内容</p>
    </child-component>
</div>
<script charset="utf-8" src="../js/vue.min.js" type="text/javascript"></script>
<script type="text/javascript">
    Vue.component('child-component', {
        template: '<div><slot><p>如果父组件没有插入内容，我将作为默认出现</p></slot></div>'
    });

    var app = new Vue({
        el: '#app'
    })
</script>
</body>

</html>
